package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.NursingPlanDto;
import com.zzyl.dto.NursingPlanPageParamDto;
import com.zzyl.entity.NursingPlan;
import com.zzyl.vo.NursingPlanVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface NursingPlanMapper {
    //分页条件查询
    Page<List<NursingPlanVo>> selectByPage(NursingPlanPageParamDto nursingPlanPageParamDto);

    //查询所有
    List<NursingPlanVo> selectAll();

    //查询与当前要新增的名称重复的数量
    Long selectByName(String planName);

    //新增计划
    void insertPlan(NursingPlan nursingPlan);

    //根据ID查询
    NursingPlanVo selectById(Long id);

    //编辑计划
    void update(NursingPlan nursingPlan);

    //删除计划
    void delete(Long id);

    //更改计划状态
    void updateStatusById(@Param("id") Long id, @Param("status") Integer status);
}
